package com.yt.Insurance.models.service;

import com.yt.Insurance.models.dto.InsurancePolicyDTO;
import com.yt.Insurance.models.vo.InsurancePolicyVO;
import com.yt.Insurance.models.bo.PolicyQueryBO;
import com.github.pagehelper.PageInfo;

import java.math.BigDecimal;

public interface InsurancePolicyService {
    /**
     * 创建投保单
     */
    InsurancePolicyVO createPolicy(InsurancePolicyDTO policyDTO);

    /**
     * 根据ID查询保单
     */
    InsurancePolicyVO getPolicyById(Integer policyId);

    /**
     * 分页查询保单列表
     */
    PageInfo<InsurancePolicyVO> queryPolicyPage(PolicyQueryBO queryBO);

    /**
     * 更新保单状态（审核保单）
     */
    boolean updatePolicyStatus(Integer policyId, Integer statusAttrId, String rejectReason);

    /**
     * 退保处理
     */
    boolean surrenderPolicy(Integer policyId, String surrenderReason, BigDecimal refundAmount);
}